package com.example.book.mapper;

import com.example.book.dto.UserDTO;
import com.example.book.dto.UserPageDTO;
import com.example.book.entity.User;
import com.example.book.vo.UserVO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {
     @Select("select * from user where name=#{name}")
     User getUserMeg(String name);
     @Insert("insert into user (name,password,sex,creat_time,update_time) " +
             "values " +
             "(#{name},#{password},#{sex},#{createTime},#{updateTime})")
     void insert(User user);

    Page<UserVO> getUserPage(UserPageDTO userPageDTO);

    void deleteUser(List<String> name);
}
